import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooCrmBusinessCardController } from '../../../controllers';
const uctoocrmBusinessCardRouter = new Router();
const crmBusinessCardController = new uctooCrmBusinessCardController();

uctoocrmBusinessCardRouter.post('/add', requireUser, crmBusinessCardController.add);
uctoocrmBusinessCardRouter.post('/edit', requireUser, rowLevelPermission('uctoo/crm_business_card'), crmBusinessCardController.edit);
uctoocrmBusinessCardRouter.post('/del', requireUser, rowLevelPermission('uctoo/crm_business_card'), crmBusinessCardController.delete);

//For getting crmBusinessCard with permission control
uctoocrmBusinessCardRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/crm_business_card'), crmBusinessCardController.getSingle);
uctoocrmBusinessCardRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/crm_business_card'), crmBusinessCardController.getMany);
uctoocrmBusinessCardRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/crm_business_card'), crmBusinessCardController.getMany);

//#endregion AutoCreateCode
export default uctoocrmBusinessCardRouter;
